package com.cadre.basic.datastructure.graph;

import java.util.List;

// 顶点类
public class Vertex {

    String name;

    List<Edge> edges;

    boolean visited; //是否被访问过

    int inDegree; // 入度 用于拓扑排序

    int dist = INF ; // 距离,默认无穷大

    Vertex prev = null;

    static final Integer INF = Integer.MAX_VALUE;



    public Vertex(String name){
        this.name = name;
    }

    public String getName(){
        return name;
    }

}
